package etnorservice.etnor_service.mapper;

import etnorservice.etnor_service.domain.ProblemDO;
import etnorservice.etnor_service.domain.po.DocumentSpace;
import etnorservice.etnor_service.domain.po.WorkspaceTreeEntity;
import etnorservice.etnor_service.request.SpaceCreateRequest;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: cc
 * @Date: 2024/08/30/9:47
 **/
@Mapper
public interface WorkspaceTreeMapper {

    WorkspaceTreeEntity findTreeById(@Param("account") String account);
    List<WorkspaceTreeEntity> findChildrenNode(@Param("id") Integer id);
    List<ProblemDO> findProblemById(@Param("id") Integer id,@Param("adminId") String adminId);
    List<WorkspaceTreeEntity>findTreeParent();
    List<String> findUserSpaceIdByAccount(@Param("account") String account);
    String findSpaceNameBySpaceId(@Param("spaceId") String spaceId);
    DocumentSpace findSpaceNameById(@Param("spaceId") String spaceId);
    void insertSpace(SpaceCreateRequest spaceCreateRequest);
    void createFlex(@Param("spaceId") String spaceId,@Param("account") String account);
    void changeUserSpaceId(@Param("spaceId") String spaceId,@Param("account") String account);
    List<DocumentSpace> findAllBrother(@Param("spaceId") String spaceId);
    void resetBrotherNode(@Param("spaceId") String spaceId);
    List<DocumentSpace> findHaveChildrenNode(@Param("spaceId") String spaceId);
    void deleteSpaceById(@Param("spaceId") String spaceId);
    void setNewSpaceHook(@Param("spaceId") String spaceId,
                         @Param("account") String account);
    //更新映射表
    void updateFlexTable(@Param("spaceId") String spaceId);

}
